#include<bits/stdc++.h>
using namespace std;

int main(){ // P1688
    //freopen("xxx.in","r",stdin);
    //freopen("xxx.out","w",stdout);
    int n,cnt = 0;
    cin >> n;
    for(int i = 1; i <= n; i++){
        int x = i;
        while(x){
            if(x % 10 == 0){
                cnt++;
                break; // 终止内层循环!
            }
            x /= 10;
        }
    }
    cout << cnt;
    return 0;
}
// P1887 - 【基础】数值计算
